package com.zhengb.algorithmdemo.basic.tree.binarsearchtree;

/**
 * 二叉搜索数节点定义
 *
 * @author zhengbo
 * @date 2020/2/25
 */
public class BinarySearchTreeNode<T> {

    private T data;

    private BinarySearchTreeNode<T> left;

    private BinarySearchTreeNode<T> right;

    public BinarySearchTreeNode() {

    }

    public BinarySearchTreeNode(T data) {
        this.data = data;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public BinarySearchTreeNode<T> getLeft() {
        return left;
    }

    public void setLeft(BinarySearchTreeNode<T> left) {
        this.left = left;
    }

    public BinarySearchTreeNode<T> getRight() {
        return right;
    }

    public void setRight(BinarySearchTreeNode<T> right) {
        this.right = right;
    }
}
